package cn.xiongxf.feign;

import cn.xiongxf.result.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "service-course",fallbackFactory = CourseFeignClientFallbackFactory.class)
public interface CourseFeignClient {

    /**
     * 查询课程状态给用户
     */
    @RequestMapping(value="/course/status/{courseId}",method= RequestMethod.GET)
    JsonResult selectCourseStatusForUser(@PathVariable Long courseId);

    /**
     * 根据课程ID查询课程数据给订单页
     */
    @RequestMapping(value="course/orderData/{courseIdsStr}", method= RequestMethod.GET)
    JsonResult selectCourseDataForOrder(@PathVariable String courseIdsStr);
}
